﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Sfcorp.Control
{
    public partial class ctrAgyBns : UserControl
    {
        public ctrAgyBns()
        {
            InitializeComponent();
        }

        private void ctrAgyBns_Load(object sender, EventArgs e)
        {
            switch (BizType)
            {
                case "BNS":
                    barCreate.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                    barDelete.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                    barLock.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                    break;
                case "IMG":
                    barImgAdd.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                    barImgDel.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                    break;
                case "BILL":
                    //barBillAdd.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                    barBillEdit.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                    //barBillDel.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                    barBillTY.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                    break;
            }
        }

        private string bizType = string.Empty;
        /// <summary>
        /// 业务类型BNS,IMG,BILL
        /// </summary>
        public string BizType
        {
            set
            {
                bizType = value;
            }
            get
            {
                return bizType;
            }
        }
    }


}
